//
//  IconCollectionViewCell.m
//  NewPagedFlowViewDemo
//
//  Created by apple on 2017/7/10.
//  Copyright © 2017年 robertcell.net. All rights reserved.
//

#import "IconCollectionViewCell.h"

@implementation IconCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {
        
        UIView * backV = [UIView new];
        backV.backgroundColor = [UIColor whiteColor];
        self.backgroundView = backV;
        CGFloat imgH = frame.size.height*0.8;
        CGFloat imgW = imgH;
        CGFloat imgX = (frame.size.width - imgW)/2;
        CGFloat imgY = (frame.size.height - imgH)/2;
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(imgX, imgY, imgW, imgH)];
        self.imageView.contentMode = UIViewContentModeScaleAspectFill;
        self.imageView.layer.cornerRadius = imgH/2;
        self.imageView.clipsToBounds = YES;
        
        [self.contentView addSubview:self.imageView];
        
    }
    return self;
}
@end
